﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyEvaler.aspx.cs" Inherits="TeacherEval_School_ScoreInput_MyEvaler" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>评价对象管理</title>
    <link type="text/css" rel="stylesheet" href="../../Common/css/main.css" />
    <script type="text/javascript" src="../../Common/js/jquery.js"></script>
    <script type="text/javascript" src="../../Common/js/common.js"></script>
    <script type="text/javascript" src="../../Common/Js/msg.js"></script>
    <script language="javascript">
        var currentKey = "<%= KeyWord %>";
        function AddSetting()
        {
            if(currentKey == "Teacher_Term_Eval")
            {
                document.getElementById("GetTeacher").src="SelectCauseTeacher.aspx";
                ShowPopForm("upInputPop", "upInputPopTitle","添加教师")   ; 
            }
            if(currentKey == "PoliticsWorker_Term_Eval")
            {
                document.getElementById("GetTeacher").src="SelectOther.aspx?type=4";
                ShowPopForm("upInputPop", "upInputPopTitle","添加行政人员")   ; 
            }
            if(currentKey == "TeachHelper_Term_Eval")
            {
                document.getElementById("GetTeacher").src="SelectOther.aspx?type=5";
                ShowPopForm("upInputPop", "upInputPopTitle","添加教学辅助人员")   ; 
            }
        }
        function SaveTeacher(temp)
        {
            var aa = new Array();
            for(var ii = 0;ii<temp.length;ii++)
            {
                aa[ii] = parseInt(temp[ii]);
            }
            PageMethods.SaveTeacher(parseInt( document.getElementById("HistoryID").value),aa,function(succ){
                ClosePopForm('upInputPop');
                document.getElementById("btnBind").click();
                
            },function(err){
              showMassgeBox("提示",err._message,1,null);
            });        
        }
        function DelThis(id)
        {
            var arr = new Array();
            arr[0] = parseInt( document.getElementById("HistoryID").value);
            arr[1] = parseInt( id);
            showConfirmBox("打开考试", "确定要删除您对此人的评估记录?",DeleID, arr);
 
        }
        function DeleID(arr)
        {
            PageMethods.DeleteTeacher(parseInt( arr[0]),parseInt(arr[1]),function(succ){
                document.getElementById("btnBind").click();
            },function(err){
                showMassgeBox("提示",err._message,1,null);
            });       
        }
        
         function detailView()
        { 
            var liList = parent.leftFrame.document.getElementById("detailLi");
            parent.leftFrame.removeActiveStyle();
             
            liList.style.display = "block";
            liList.className = "active";
        }
    </script>
    
</head>
<body style="padding-top:5px;">
    <form id="form1" runat="server">
<div class="mainWarp">
    <div class="pageBody">
     <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="True">
     </asp:ScriptManager>
        <div style=" height:98%;">
            <h4>我需要评价的教师
            <input type="button" class="commonBut" id="btnAddKind" value="新增被评人" onclick="AddSetting()" /></h4>

            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                <asp:Repeater ID="Repeater1" runat="server">
                    <HeaderTemplate>
                     <div style="overflow-y:auto;overflow-x:none;height:90%;width:480px;">
                        <table id="settingTable" border="0" cellpadding="0" cellspacing="1" width="480px"
                            class="useList">
                            <tr>
                                <th width="160px" style="text-align: left; padding-left: 5px;">
                                    工号</th>
                                <th width="160px" style="text-align: left; padding-left: 5px;">
                                    姓名
                                </th>
                                <th width="80px" style="text-align: center; padding-left: 5px;">
                                    评价录入
                                </th>
                                <th width="80px" style="text-align: center;">
                                    删除
                                </th>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                            <tr>
                                <td style="text-align: left; padding-left: 5px;">
                                    <%# Eval("TeachCode")%>
                                </td>
                                <td style="text-align: left; padding-left: 5px;">
                                    <%# Eval("TeachName")%>
                                </td>
                                <td>
                                    <a onclick="detailView();" href="../ScoreInput/TeachTermInput.aspx?HistoryId=<%= RID%>&TeacherId=<%# Eval("RID")%>&TeacherName=<%# Server.UrlEncode((string)Eval("TeachName"))%>&TeacherCode=<%# Eval("TeachCode")%>&Year=<%= SchoolCommon.Sch_SchoolInfo.SchoolYear%>&Term=<%= SchoolCommon.Sch_SchoolInfo.SchoolTerm%>&Month=0&Type=Edit">评价录入</a>
                                </td>
                                <td>
                                    <img style='cursor:hand' src="../../Common/images/delete_icon.gif" alt="删除此项" class="imageBtnStyle" onclick="DelThis(<%# Eval("RID") %>);" />
                                </td>
                            </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table></div>
                    </FooterTemplate>
                </asp:Repeater>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnBind" EventName="Click" />
            </Triggers>
            </asp:UpdatePanel>
        </div>
         <div style="display: none;">
            <asp:Button ID="btnBind" runat="server" OnClick="btnBind_Click" Text="btnBind" />
            <asp:TextBox ID="HistoryID" runat="server"></asp:TextBox>
        </div>
        <div id="upInputPop" class="layoutWarp" style="display: none; width:380px;height:300px;">
         <div class="title" >
	        <span id="upInputPopTitle"></span>
            <a title="关闭" onclick="return ClosePopForm('upInputPop')">关闭</a>
               
          </div>
        <iframe src="" name="ifram" id="GetTeacher" style="height: 80%;width: 95%;overflow-y:auto;overflow-x:none;" frameborder="0"   ></iframe>
    </div>
    </div>
</div>
    </form>
</body>
</html>
